import request from '@/config/axios'
import type {
  AnalysisTotalTypes,
  UserAccessSource,
  WeeklyUserActivity,
  MonthlySales
} from './types'

export const getCountApi = (): Promise<IResponse<AnalysisTotalTypes[]>> => {
  return request.get({ url: '/analysis/total' })
}

export const getUserAccessSourceApi = (): Promise<IResponse<UserAccessSource[]>> => {
  return request.get({ url: '/analysis/userAccessSource' })
}

export const getWeeklyUserActivityApi = (): Promise<IResponse<WeeklyUserActivity[]>> => {
  return request.get({ url: '/analysis/weeklyUserActivity' })
}

export const getMonthlySalesApi = (): Promise<IResponse<MonthlySales[]>> => {
  return request.get({ url: '/analysis/monthlySales' })
}
//首页信息（前四个）
export const scspzs = () => {
  return request.get({ url: '/api/teacherSystem/selVideoCount'})
}
export const splls = ()=> {
  return request.get({ url: '/api/teacherSystem/selVideoLook'})
}
export const spscl = () => {
  return request.get({ url: '/api/teacherSystem/selVideoCollect'})
}
export const spdzl = () => {
  return request.get({ url: '/api/teacherSystem/selVideoLike' })
}
//总览
export const kcsl = () => {
  return request.get({ url: '/api/teacherSystem/selCourseStatus' })
}
export const spsl = () => {
  return request.get({ url: '/api/teacherSystem/selProductSate' })
}
export const jrxz = () => {
  return request.get({ url: '/api/teacherSystem/selUserOverviewToday' })
}
export const zrxz = () => {
  return request.get({ url: '/api/teacherSystem/selUserOverviewYesterday' })
}
export const byxz = () => {
  return request.get({ url: '/api/teacherSystem/selUserOverviewMonth' })
}
export const qall = () => {
  return request.get({ url: '/api/teacherSystem/selUserOverviewCount' })
}
//统计图折线图
export const zhexian = () => {
  return request.post({ url: '/api/teacherSystem/selCurriculumCount',params:{name:"FeedbackStatistics"}})
}
